Release 10.1A: OpenEdge Reporting:
Query/Results for Windows
Using Query by Example to refine a query
Query by Example is available in the Form view. Use Query by Example when you want to refine the selection criteria for the query by using one or more display fields in the form. If you already created a
WHERE clausefor the same table using Data Selection, Query by Example automatically deletes theWHERE clauseand replaces it with theWHERE clauseyou create using Query by Example.
![]()
To use Query by Example:
- Choose Query by Example at the bottom of the form. A blank form appears:
![]()
You can use any of these fields to modify the selection criteria for the query.
- Go to the first field you want to use and type the selection criteria for the field.
The selection criteria for a field consists of an operator and the value you want the operator to work on. For example, to retrieve all the unpaid invoices, type > 0 in the Balance field.
You can use the following comparison operators: =, <>, <,
>, <=, >=, Begins, Matches, and Contains. See Appendix B, "Comparison Operators," for a description of these operators. If you do not enter a comparison operator in the selection criteria, Query by Example automatically uses the equality operator.You do not have to place quotation marks (“”) around text strings unless the first word in the text string happens to be the name of a comparison operator. For example, to select all the records that pertain to customers in Massachusetts, type “MA” in the State field.
- If you want to further refine the selection criteria, enter the selection criteria for one or more additional fields. For example, to display unpaid invoices for the first 49 customers, type <= 49 in the Cust-Num field and > 0 in the Balance field:
![]()
- When you are finished defining the selection criteria, choose OK.
Results saves the selection criteria as a
WHERE clauseand retrieves the matching records. Note that once you create aWHERE clause, Results maintains theWHERE clauseuntil you change or delete it.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |